﻿<?php 
	session_start();
	if($_SESSION['uid']==""||$_SESSION['level']==""){
		header("Location: ./login.php");
		exit();
	}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>主页面</title>
</head>
<body>
<header class="navbar-wrapper">
	<div class="navbar navbar-fixed-top">
		<div class="container-fluid cl"> <a class="logo navbar-logo f-l mr-10 hidden-xs" href="/index.php">学生公寓管理系统</a> <a class="logo navbar-logo-m f-l mr-10 visible-xs" href="/aboutHui.shtml">H-ui</a> 
			<span class="logo navbar-slogan f-l mr-10 hidden-xs"></span> 
			<a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;">&#xe667;</a>
			<nav class="nav navbar-nav">
				
		</nav>
		<nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
			<ul class="cl">
				<li class="dropDown dropDown_hover">
					<a href="#" class="dropDown_A"><?php echo $_SESSION['uid'];?><i class="Hui-iconfont">&#xe6d5;</i></a>
					<ul class="dropDown-menu menu radius box-shadow">
						<!--<li><a href="javascript:;" onClick="myselfinfo()">个人信息</a></li>
						<li><a href="#">切换账户</a></li>-->
						<li><a href="exit.php">退出</a></li>
				</ul>
			</li>
			</ul>
		</nav>
	</div>
</div>
</header>
<aside class="Hui-aside">
	<div class="menu_dropdown bk_2">
	<?php 
	/**
	 * 1-宿舍管理员
	 * 2-辅导员
	 * 3-宿管中心人员
	 * 4-后勤处管理员
	 */
	if($_SESSION['level']==3){
		echo '<dl id="menu-apartment">
			<dt><i class="Hui-iconfont">&#xe625;</i> 公寓管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
			<dd>
				<ul>';
					if($_SESSION['level']=='3')echo '<li><a data-href="apartment-list.php" data-title="公寓列表" href="javascript:void(0)">公寓列表</a></li>';
					if($_SESSION['level']=='3')echo '<li><a data-href="apartment-add.php" data-title="新增公寓" href="javascript:void(0)">新增公寓</a></li>';
				echo '</ul>
			</dd>
		</dl>';
	}	
	//
	if($_SESSION['level']=='3'||$_SESSION['level']=='2'){
		echo '<dl id="menu-picture">';
		echo '<dt><i class="Hui-iconfont">&#xe67f;</i> 宿舍管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt><dd><ul>';
		if($_SESSION['level']=='3') echo '<li><a data-href="instructor-dormitory-management.php" data-title="辅导员宿舍管理" href="javascript:void(0)">辅导员宿舍管理</a></li>';
		if($_SESSION['level']=='2')	{
			echo '<li><a data-href="class-dormitory-management.php" data-title="学生宿舍分配(班级)" href="javascript:void(0)">学生宿舍分配</a></li>';
			echo '<li><a data-href="student-dormitory-list.php" data-title="学生住宿信息" href="javascript:void(0)">学生住宿信息</a></li>';
			echo '<li><a data-href="student-dormitory-exchange.php" data-title="宿舍调换" href="javascript:void(0)">宿舍调换</a></li>';
		}
		if($_SESSION['level']=='3') $a='<li><a data-href="#" data-title="宿舍调换" href="javascript:void(0)">宿舍调换</a></li>';
		echo '</ul></dd></dl>';
	}
	
	if($_SESSION['level']=='2'){
		echo '<dl id="menu-product">
			<dt><i class="Hui-iconfont">&#xe60d;</i> 学生管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
			<dd>
				<ul>
					<li><a data-href="student-information-register.php" data-title="学生登记" href="javascript:void(0)">学生登记</a></li>
				</ul>
			</dd>
		</dl>';
	}
		
	if($_SESSION['level']=='4'||$_SESSION['level']=='3'){
		echo '<dl id="menu-admin">
			<dt><i class="Hui-iconfont">&#xe62d;</i> 管理员管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
			<dd>
				<ul>';
					if($_SESSION['level']=='4')echo '<li><a data-href="admin-role.php" data-title="角色管理" href="javascript:void(0)">角色管理</a></li>';
					if($_SESSION['level']=='3')echo '<li><a data-href="instructor-major-allocating.php" data-title="年级专业管理" href="javascript:void(0)">辅导员年级专业管理</a></li>';
				echo '</ul>
			</dd>
		</dl>';
	}
	?>
		<dl id="menu-system">
			<dt><i class="Hui-iconfont">&#xe62e;</i> 系统管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
			<dd>
				<ul>
				<?php 
					if($_SESSION['level']=='4')$a='<li><a data-href="#" data-title="系部管理" href="javascript:void(0)">系部管理</a></li>';
					if($_SESSION['level']=='4')$a='<li><a data-href="#" data-title="专业管理" href="javascript:void(0)">专业管理</a></li>';
				?>
				<li><a data-href="reset-password.php" data-title="重置密码" href="javascript:void(0)">重置密码</a></li>
				</ul>
		</dd>
	</dl>
</div>
</aside>
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
<section class="Hui-article-box">
	<div id="Hui-tabNav" class="Hui-tabNav hidden-xs">
		<div class="Hui-tabNav-wp">
			<ul id="min_title_list" class="acrossTab cl">
				<li class="active">
					<span title="主页" data-href="welcome.html">主页</span>
					<i></i>
					<em></em></li>
		</ul>
	</div>
		<div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d4;</i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d7;</i></a></div>
</div>
	<div id="iframe_box" class="Hui-article">
		<div class="show_iframe">
			<div style="display:none" class="loading"></div>
			<iframe scrolling="yes" frameborder="0" src="welcome.html"></iframe>
	</div>
</div>
</section>

<div class="contextMenu" id="Huiadminmenu">
	<ul>
		<li id="closethis">关闭当前 </li>
		<li id="closeall">关闭全部 </li>
	</ul>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
<script type="text/javascript">

</script>
</body>
</html>